<?php
/*******************************************************************************
 * 3 column dashboard
 * 3 column riverdashboard gifts
 *
 * @package 3 column dashboard
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Christian Heckelmann
 * @copyright TheFloridaCircle.com 2008-2009
 * @link http://www.thefloridacircle.com/
 *
 ******************************************************************************/
	 //load elgg engine
    include_once(dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__))))))) . "/engine/start.php");
	
    $page_owner = page_owner_entity();
    if ($page_owner === false || is_null($page_owner)) {
        $page_owner = $_SESSION['user'];
        set_page_owner($page_owner->getGUID());
    } 
    $friends = $_SESSION['user']->getFriends('', 9999);
	
    
    // set the title
    $title = elgg_echo('gifts:sendgifts');
 
    // start building the main column of the page
	    $area2 = "<div id='river_container2' style='margin-top:3px;'><div class='dash_pad'>";
	    $area2 .= "<div style='border-bottom:1px solid silver; margin:0 auto 5px auto;'>";
        $area2 .= "<div style='float:left; width:49%;'>";
        $area2 .= "<img style='float:left;' src='" .$CONFIG->wwwroot. "mod/riverdashboard/graphics/icon_gift.png'> <span style='padding:0 0 0 3px;'>" .elgg_echo('river:gift:gifts'). "</span>";
        $area2 .= "</div>";
        $area2 .= "<div align='right' style='float:right; width:49%;'>";
        $area2 .= "<input style=\"border:none; padding:0 0 2px 0;\" type=\"image\" src=\"" .$CONFIG->wwwroot. "mod/riverdashboard/graphics/close.png\" onClick=\"document.getElementById('load_content').innerHTML=''\"></div>";
        $area2 .= "<div class='clearfloat'></div></div>";
        $area2 .= elgg_view("riverdashboard/ajaxpage/forms/giftform",array('friends' => $friends));
	    $area2 .= "</div></div>";
    
	echo $area2;

?>